/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.opmviewer.jung;

import edu.uci.ics.jung.visualization.util.VertexShapeFactory;
import java.awt.Color;
import java.awt.Paint;
import java.awt.Shape;
import org.openprovenance.model.Agent;

/**
 *
 * @author grzegorz
 */
public class JungOPMAgent extends Agent implements JungOPMVertex {

    public Shape getShape() {
        VertexShapeFactory<JungOPMVertex> vsf = new VertexShapeFactory();
        return vsf.getRoundRectangle(this);
    }

    public Paint getPaint() {
        return Color.GREEN;
    }

    public String getLabel() {
        return this.getLabel().toString();
    }

    @Override
    public boolean equals(Object o){
        if (!(o instanceof JungOPMVertex)) {
            return false;
        }
        return (getLabel().compareTo(
                  ((JungOPMVertex) o).getLabel()
                  ) == 0);
    }

    @Override
    public int hashCode() {
        int hash = 3;
        return hash;
    }
}
